<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- <style type="text/css">
body {
position:absolute;
top:50%;
left:50%;
margin:-150px 0 0 -200px;
width:400px;
height:300px;
}
</style> -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>干扰分析设置</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/javascript" src="jquery-easyui-v1.4.4/jquery.min.js"></script>
-->

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">  

//干扰控制函数
  setInterval(function(){
	  getStatus(); 
  }, 5000);
  function getStatus() {
	  var url = "${pageContext.request.contextPath}/interferencequery/Status.do";  
		var data = {type:1};
		$.ajax({   type : "get",   async : true, //同步请求   
			url : url,   
			data : data,      
			dataType:"json",
			success:function(dates){
				//转为JSON对象
				var dataObj=JSON.stringify(dates); 
				var val = JSON.parse(dataObj);
				// var dataObj = {"total":28,"rows":[{"frontProcessorID":"111","recordID":"Koi","downGain":10.00,"upGain":"P","timeStamp":36.50,"timeStampStr":"Large","cellInfo":"EST-1"}]};
			   	// $("Status").html(val.status);
				// $("#dg").datagrid("loadData",dataObj);
				if(val.status>0){
					document.getElementById("Status").innerHTML = "干扰分析正在进行中...";
					document.getElementById("action").innerHTML = "停止分析";
				}
				else{
					document.getElementById("Status").innerHTML = "本时段干扰分析已完成,查看分析结果请点击查看按钮！！！";
				    document.getElementById("action").innerHTML = "重启分析";
				} 		
			},   
			error: function() {
				alert("获取数据失败，请稍后再试！");
			}  
		});   
  }
  function changedatabase(){
	  $.post("${pageContext.request.contextPath}/interferencequery/changedatabase.do",{primaryKeys:1},function(result){
			if(result.success){
				 
			}else{
				
			}
		},"json");
		  
  }
  function check(){
	  if (parent.$('#tabs').tabs('exists', "干扰告警查询")) {
			 parent.$('#tabs').tabs('close', "干扰告警查询")
			 var url="/page_interference/Alarmhistory.jsp";
			 parent.openTab("干扰告警查询",encodeURI(url));
		 } 
		 else {
			 var url="/page_interference/Alarmhistory.jsp";
			 parent.openTab("干扰告警查询",encodeURI(url));
		 }
  }
  
//干扰告警级别配置函数

    getData();	
	function getData(){
		var url = "${pageContext.request.contextPath}/interferencequery/interferenceconfig.do";  
		var data = {type:1};
		$.ajax({   type : "get",   async : true, //同步请求   
			url : url,   
			data : data,      
			dataType:"json",
			success:function(dates){
			//转为JSON对象
			var dataObj=JSON.stringify(dates); 
			var val = JSON.parse(dataObj);
			var dataObj1=JSON.stringify(val.alarmConfig);  
			var val1 = JSON.parse(dataObj1);
			var value1=val1[1];
			var len1=value1.length-1;
			$('#haveFSinf1').combobox('setValue', value1[0]);
			$('#left1').combobox('setValue', value1[1]-1);
			$('#right1').combobox('setValue', value1[len1]-1);
			var value2=val1[2];
			var len2=value2.length-1;
			$('#haveFSinf2').combobox('setValue', value2[0]);
			$('#left2').combobox('setValue', value2[1]-1);
			$('#right2').combobox('setValue', value2[len2]-1);
			var value3=val1[3];
			var len3=value3.length-1;
			$('#haveFSinf3').combobox('setValue', value3[0]);
			$('#left3').combobox('setValue', value3[1]-1);
			$('#right3').combobox('setValue', value3[len3]-1);
			var value4=val1[4];
			var len4=value4.length-1;
			$('#haveFSinf4').combobox('setValue', value4[0]);
			$('#left4').combobox('setValue', value4[1]-1);
			$('#right4').combobox('setValue', value4[len4]-1);
			var value5=val1[5];
			var len5=value5.length-1;
			$('#haveFSinf5').combobox('setValue', value5[0]);
			$('#left5').combobox('setValue', value5[1]-1);
			$('#right5').combobox('setValue', value5[len5]-1);
			},   
			error: function() {
				alert("获取数据失败，请稍后再试！");
			}  
			});   
	}
	function refresh(){
		getData();
	}
	
    //验证输入是否符合要求的连续，并修改
	function submitData(){
		var submit="{\"1\":";
		var haveFs = 8;
		var withoutFs = 8;
		var val1=$('#haveFSinf1').combobox('getValue');
		var lef1=$('#left1').combobox('getText');
		var rig1=$('#right1').combobox('getText');
		if(val1>0){
			if(haveFs-rig1>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			submit=submit+"[1,";
			haveFs=lef1;
			for(var i=lef1;i<=rig1;i++){
			    submit=submit+i+"";
			    if(i<rig1){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		else{
			submit=submit+"[0,";
			if(withoutFs-rig1>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			withoutFs=lef1;
			for(var i=lef1;i<=rig1;i++){
			    submit=submit+i+"";
			    if(i<rig1){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		var val2=$('#haveFSinf2').combobox('getValue');
		var lef2=$('#left2').combobox('getText');
		var rig2=$('#right2').combobox('getText');
		if(val2>0){
			if(haveFs-rig2>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			submit=submit+"\"2\":[1,";
			haveFs=lef2;
			for(var i=lef2;i<=rig2;i++){
			    submit=submit+i+"";
			    if(i<rig2){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		else{
			submit=submit+"\"2\":[0,";
			if(withoutFs-rig2>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			withoutFs=lef2;
			for(var i=lef2;i<=rig2;i++){
			    submit=submit+i+"";
			    if(i<rig2){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		var val3=$('#haveFSinf3').combobox('getValue');
		var lef3=$('#left3').combobox('getText');
		var rig3=$('#right3').combobox('getText');
		if(val3>0){
			if(haveFs-rig3>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			submit=submit+"\"3\":[1,";
			haveFs=lef3;
			for(var i=lef3;i<=rig3;i++){
			    submit=submit+i+"";
			    if(i<rig3){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		else{
			submit=submit+"\"3\":[0,";
			if(withoutFs-rig3>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			withoutFs=lef3;
			for(var i=lef3;i<=rig3;i++){
			    submit=submit+i+"";
			    if(i<rig3){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		var val4=$('#haveFSinf4').combobox('getValue');
		var lef4=$('#left4').combobox('getText');
		var rig4=$('#right4').combobox('getText');
		if(val4>0){
			if(haveFs-rig4>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			submit=submit+"\"4\":[1,";
			haveFs=lef4;
			for(var i=lef4;i<=rig4;i++){
			    submit=submit+i+"";
			    if(i<rig4){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		else{
			submit=submit+"\"4\":[0,";
			if(withoutFs-rig4>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			withoutFs=lef4;
			for(var i=lef4;i<=rig4;i++){
			    submit=submit+i+"";
			    if(i<rig4){
			    	submit=submit+",";
			    }
			}
			submit=submit+"],"
		}
		var val5=$('#haveFSinf5').combobox('getValue');
		var lef5=$('#left5').combobox('getText');
		var rig5=$('#right5').combobox('getText');
		if(val5>0){
			if(haveFs-rig5>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			submit=submit+"\"5\":[1,";
			haveFs=lef5;
			for(var i=lef5;i<=rig5;i++){
			    submit=submit+i+"";
			    if(i<rig5){
			    	submit=submit+",";
			    }
			}
			submit=submit+"]}"
		}
		else{
			submit=submit+"\"5\":[0,";
			if(withoutFs-rig5>1){
				$.messager.alert("系统提示","请输入连续的RxQual");
				return;
			}
			withoutFs=lef5;
			for(var i=lef5;i<=rig5;i++){
			    submit=submit+i+"";
			    if(i<rig5){
			    	submit=submit+",";
			    }
			}
			submit=submit+"]}"
		}	
		$.post("${pageContext.request.contextPath}/interferencequery/insertalarmconfig.do",{AlarmConfig:submit},function(result){
				if(result.success){
					 $.messager.alert("系统提示","参数应用成功！");
				}else{
					$.messager.alert("系统提示","参数应用失败！");
				}
			},"json");
			
	}
	
	//干扰参数配置函数
	getData1();
	
	var infMinMinutes_old = '';
	var infMaxMinutes_old = '';
	var minrxqual_old = '';
	var numofinfrxqual_old = '';
	var minleisuretime_old = '';
	var maxleisuretime_old = '';
	var NotKPSTCHthreshold_old = '';
	var KPSTCHthreshold_old = '';
	var Onepointthreshold_old = '';
	var Otherchannelthreshold_old = '';
	var Servicelevel1_old = '';
	var Servicelevel2_old = '';
	var Servicelevel3_old = '';
	var Minimumlevel_old = '';
	var BCCH_old = '';
	var TCH_old = '';
	var BLOCK_old = '';
	var INTERMODULATION_old = '';
	var SPURIOUS_old = '';
	var OTHER_old = '';
	
	function getData1(){
		var url = "${pageContext.request.contextPath}/interferencequery/interferenceconfig.do";  
		var data = {type:1};
		$.ajax({   type : "get",   async : true, //同步请求   
			url : url,   
			data : data,      
			dataType:"json",
			success:function(dates){
				//转为JSON对象
				var dataObj=JSON.stringify(dates); 
				var val = JSON.parse(dataObj);
				$('#infMinMinutes').val(val.infMinMinutes);
				$('#infMaxMinutes').val(val.infMaxMinutes);
				$('#minrxqual').val(val.minrxqual);
				$('#numofinfrxqual').val(val.numofinfrxqual);
				$('#minleisuretime').val(val.minleisuretime);
				$('#maxleisuretime').val(val.maxleisuretime);
			    $('#NotKPSTCHthreshold').val(val.NotKPSTCHthreshold);
				$('#KPSTCHthreshold').val(val.KPSTCHthreshold);
				$('#Onepointthreshold').val(val.Onepointthreshold);
				$('#Otherchannelthreshold').val(val.Otherchannelthreshold);
				$('#Servicelevel1').val(val.Servicelevel1);
				$('#Servicelevel2').val(val.Servicelevel2);
				$('#Servicelevel3').val(val.Servicelevel3);
				$('#Minimumlevel').val(val.Minimumlevel);
				$('#BCCH').val(val.BCCH);
				$('#TCH').val(val.TCH);
				$('#BLOCK').val(val.BLOCK);
				$('#INTERMODULATION').val(val.INTERMODULATION);
				$('#SPURIOUS').val(val.SPURIOUS);
				$('#OTHER').val(val.OTHER);
				
				
				infMinMinutes_old = val.infMinMinutes;
				infMaxMinutes_old = val.infMaxMinutes;
				minrxqual_old = val.minrxqual;
				numofinfrxqual_old = val.numofinfrxqual;
				minleisuretime_old = val.minleisuretime;
				maxleisuretime_old = val.maxleisuretime;
				NotKPSTCHthreshold_old = val.NotKPSTCHthreshold;
				KPSTCHthreshold_old = val.KPSTCHthreshold;
				Onepointthreshold_old = val.Onepointthreshold;
				Otherchannelthresh_old = val.Otherchannelthreshold;
				Servicelevel1_old = val.Servicelevel1;
				Servicelevel2_old = val.Servicelevel2;
				Servicelevel3_old = val.Servicelevel3;
				Minimumlevel_old = val.Minimumlevel;
				BCCH_old = val.BCCH;
				TCH_old = val.TCH;
				BLOCK_old = val.BLOCK;
				INTERMODULATION_old = val.INTERMODULATION;
				SPURIOUS_old = val.SPURIOUS;
				OTHER_old = val.OTHER;
			},   
			error: function() {
				alert("获取数据失败，请稍后再试！");
			}  
		});   
	}
	function refresh1(){
		getData1();
	}
	
	function submitData1(){
		var type="^[0-9]*[0-9][0-9]*$";   //判断输入是否为正整数
		var type1="^-[0-9]*[0-9][0-9]*$"  //判断输入是否为负整数
		var re = new RegExp(type);
		var re1=new RegExp(type1);
		if(($("#infMinMinutes").val().match(re)==null)||($("#infMaxMinutes").val().match(re)==null)||($("#minrxqual").val().match(re)==null)||($("#numofinfrxqual").val().match(re)==null)||
			($("#minleisuretime").val().match(re)==null)||($("#maxleisuretime").val().match(re)==null)||($("#NotKPSTCHthreshold").val().match(re)==null)||($("#KPSTCHthreshold").val().match(re)==null)||
			($("#Onepointthreshold").val().match(re)==null)||($("#Otherchannelthreshold").val().match(re)==null)||($("#Servicelevel1").val().match(re)==null)||($("#Servicelevel2").val().match(re)==null)||
			($("#Servicelevel3").val().match(re)==null)||($("#Minimumlevel").val().match(re1)==null))
			{
				$.messager.alert("系统提示","请输入正确的整数！");
			 	return;
			}

		
		 $.post("${pageContext.request.contextPath}/interferencequery/insertinfconfig.do",{
			 InfMinMinutes:$("#infMinMinutes").val(),InfMinMinutesOld:infMinMinutes_old,
			 InfMaxMinutes:$("#infMaxMinutes").val(),InfMaxMinutesOld:infMaxMinutes_old,
			 Minrxqual:$("#minrxqual").val(),MinrxqualOld:minrxqual_old,
			 Numofinfrxqual:$("#numofinfrxqual").val(),NumofinfrxqualOld:numofinfrxqual_old,
			 Minleisuretime:$("#minleisuretime").val(),MinleisuretimeOld:minleisuretime_old,
			 Maxleisuretime:$("#maxleisuretime").val(),MaxleisuretimeOld:maxleisuretime_old,
			 NotKPSTCHthreshold:$("#NotKPSTCHthreshold").val(),NotKPSTCHthresholdOld:NotKPSTCHthreshold_old,
			 KPSTCHthreshold:$("#KPSTCHthreshold").val(),KPSTCHthresholdOld:KPSTCHthreshold_old,
			 Onepointthreshold:$("#Onepointthreshold").val(),OnepointthresholdOld:Onepointthreshold_old,
			 Otherchannelthreshold:$("#Otherchannelthreshold").val(),OtherchannelthresholdOld:Otherchannelthresh_old,
			 Servicelevel1:$("#Servicelevel1").val(),Servicelevel1Old:Servicelevel1_old,
			 Servicelevel2:$("#Servicelevel2").val(),Servicelevel2Old:Servicelevel2_old,
			 Servicelevel3:$("#Servicelevel3").val(),Servicelevel3Old:Servicelevel3_old,
			 Minimumlevel:$("#Minimumlevel").val(),MinimumlevelOld:Minimumlevel_old,
			 BCCH:$("#BCCH").val(),BCCHOld:BCCH_old,
			 TCH:$("#TCH").val(),TCHOld:TCH_old,
			 BLOCK:$("#BLOCK").val(),BLOCKOld:BLOCK_old,
			 INTERMODULATION:$("#INTERMODULATION").val(),INTERMODULATIONOld:INTERMODULATION_old,
			 SPURIOUS:$("#SPURIOUS").val(),SPURIOUSOld:SPURIOUS_old,
			 OTHER:$("#OTHER").val(),OTHEROld:OTHER_old},function(result){
				if(result.success){
					 $.messager.alert("系统提示","参数应用成功！");
				}else{
					$.messager.alert("系统提示","参数应用失败！");
				}
			},"json");
			
	}
	
//手动互调干扰计算
   function refresh2(){
		$("#channel").val("");
		$("#infchannel").val("");
		$("#result").val("");
		
	}
	function calculate(){
		var State=$('#selectpattern').combobox('getValue');   
		var Channel=$("#channel").val();
		var Infchannel=$("#infchannel").val() 
		$.post("${pageContext.request.contextPath}/interferencequery/calintermodu.do",{state:State,channel:Channel,infchannel:Infchannel},function(result){
				if(!result.success){
					$.messager.alert("系统提示","请按要求选择模式或输入正确的数据！");
					$("#result").val("请按要求选择模式或输入正确的数据！");
				}
				else{
					$("#result").val(result.value);
					$.messager.alert("系统提示","计算结束");
				}
			},"json");
			
	}
</script>
</head>
<body>
<!-- 左边功能框 -->
<div style="float:left;margin-left:10%;margin-top:5px">
	    <div style="width:550px;height:140px;padding:5px;">
			<table style="BORDER-COLLAPSE: collapse;" borderColor=#111111 cellSpacing=0 cellPadding=0  width=550    bgColor=#f5efe7 border=0>      
			    <TR >  
			       <TD align=middle bgColor=#dbc2b0 height=40 colspan="2"><B>干扰分析状态</B> </TD>  
			    </TR>  
			    <tr >  
			       <td height="50" align="center"><B>当前状态：</B></td>  
			       <td height="50" width="300" id="Status"> </td>  
			    </tr>  
			    <tr >
					<td style="text-align:center;width: 200px" colspan="2">	
						<a href="javascript:changedatabase()" class="easyui-linkbutton" data-options="size:'20px',iconAlign:'top'"><div id="action"></div></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:check()" class="easyui-linkbutton" data-options="size:'20px',iconAlign:'top'"><div id="action">查看</div></a>
					</td>
				</tr>
			</table>
			<!-- <br/>
			<a href="javascript:changedatabase()" class="easyui-linkbutton" data-options="size:'20px',iconAlign:'top'"><div id="action"></div></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="javascript:check()" class="easyui-linkbutton" data-options="size:'20px',iconAlign:'top'"><div id="action">查看</div></a> -->
		</div>
		
		<div  style="width:550px;height:300px;padding:5px;">
		 <form id="fm" action="" method="post">
			<table cellpadding="6px" url="" fit="true" cellSpacing=0 cellPadding=0  width=550 bgColor=#f5efe7>
				<tr align="center">
					<td colspan="3" bgColor=#dbc2b0 style="padding-bottom: 10px"><B>干扰告警参数配置</B></td>
				</tr>
				<tr> 
				    <td style="text-align:center;width: 100px"">告警级别</td>
				    <td style="text-align:center;width: 200px">有无频谱干扰</td>
				    <td style="text-align:center;width: 150px">RxQual范围</td>
				<tr>
					<td style="text-align:center;width: 100px">1</td>
					<td style="text-align:center;width: 200px">
					    <input class="easyui-combobox" id="haveFSinf1" 
						    data-options="panelHeight:'auto',valueField:'lable',textField:'value',
						    data:[{
						                lable:'1',
						                value:'是'
						            },
						            {
						                lable:'0',
						                value:'否'
						            }]" value="1" style="text-align:center;width: 50px" editable="false"/>
				    </td>
					<td style="text-align:center;width: 150px">
					   <input class="easyui-combobox" id="left1" name="left1" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>&nbsp;&nbsp;—&nbsp;&nbsp;
					   <input class="easyui-combobox" id="right1" name="right1" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;width: 100px">2</td>
					<td style="text-align:center;width: 200px">
					 <input class="easyui-combobox" id="haveFSinf2" 
						    data-options="panelHeight:'auto',valueField:'lable',textField:'value',
						    data:[{
						                lable:'1',
						                value:'是'
						            },
						            {
						                lable:'0',
						                value:'否'
						            }]" value="1" style="text-align:center;width: 50px" editable="false"/>
				    </td>
	
					<td style="text-align:center;width: 150px">
					   <input class="easyui-combobox" id="left2" name="left2" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>&nbsp;&nbsp;—&nbsp;&nbsp;
					   <input class="easyui-combobox" id="right2" name="right2" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;width: 100px">3</td>
					<td style="text-align:center;width: 200px">
	                     <input class="easyui-combobox" id="haveFSinf3" 
						    data-options="panelHeight:'auto',valueField:'lable',textField:'value',
						    data:[{
						                lable:'1',
						                value:'是'
						            },
						            {
						                lable:'2',
						                value:'否'
						            }]" value="1" style="text-align:center;width: 50px" editable="false"/>
				    </td>
				    <td style="text-align:center;width: 150px">
					   <input class="easyui-combobox" id="left3" name="left3" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>&nbsp;&nbsp;—&nbsp;&nbsp;
					   <input class="easyui-combobox" id="right3" name="right3" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;width: 100px">4</td>
					<td style="text-align:center;width: 200px">
					    <input class="easyui-combobox" id="haveFSinf4" 
						    data-options="panelHeight:'auto',valueField:'lable',textField:'value',
						    data:[{
						                lable:'1',
						                value:'是'
						            },
						            {
						                lable:'0',
						                value:'否'
						            }]" value="1" style="text-align:center;width: 50px" editable="false"/>
				    </td>
				    <td style="text-align:center;width: 150px">
					   <input class="easyui-combobox" id="left4" name="left4" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>&nbsp;&nbsp;—&nbsp;&nbsp;
					   <input class="easyui-combobox" id="right4" name="right4" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;width: 100px">5</td>
	                 <td style="text-align:center;width: 200px">
					    <input class="easyui-combobox" id="haveFSinf5" 
						    data-options="panelHeight:'auto',valueField:'lable',textField:'value',
						    data:[{
						                lable:'1',
						                value:'是'
						            },
						            {
						                lable:'0',
						                value:'否'
						            }]" value="1" style="text-align:center;width: 50px" editable="false"/>
				    </td>
				    <td style="text-align:center;width: 150px">
					  <input class="easyui-combobox" id="left5" name="left5" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>&nbsp;&nbsp;—&nbsp;&nbsp;
					   <input class="easyui-combobox" id="right5" name="right5" data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/interferencequery/alarmvalue.do'" value="-1" style="text-align:center;width: 50px" editable="false"/>
					</td>
				</tr>
				<c:if test="${currentMemberShip.group.name=='管理员' }">
				<tr>
				   
					<td style="text-align:center;" colspan="3">	
						<a href="javascript:submitData()" class="easyui-linkbutton" >应用</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:refresh()" class="easyui-linkbutton" >刷新</a>
					</td>
				</tr>
				</c:if>
			</table>
		</form>
		</div>
		<div style="width:550px;height:450px;padding:5px;">
		<form id="fm" action="" method="post">
			<table cellpadding="10px" url="" fit="true" cellSpacing=0 cellPadding=0  width=550 bgColor=#f5efe7>
				<tr align="center">
					<th colspan="3" bgColor=#dbc2b0 style="padding-bottom: 10px"><big>手动互调干扰计算</big></th>
				</tr>
				<tr align="center">
					<th colspan="3" style="padding-bottom: 10px">提示：信道号/频率输入用","隔开(如:1,2),且干扰信道号/频率至少有2个</th>
				</tr>
				<tr>
					<td style="text-align:center;width: 200px">选择输入模式：</td>
					<td style="width: 350px">
					    <input class="easyui-combobox" id="selectpattern" data-options="valueField:'lable',textField:'value',panelHeight:'auto',
						    data:[{lable:'0', value:'输入为信道号(1-124,999-1024)'},
						          {lable:'1', value:'输入为频率(885-915,930-960 MHz)'}]" value="0" style="text-align:center;width: 300px" editable="false"/>
				    </td>
				</tr>
				<tr>
					<td style="text-align:center;width: 200px">干扰信道号/频率：</td>
					<td style="width: 350px">
						<input type="text" id="channel" name="channel" class="easyui-validatebox"  values="" style="text-align:center;width: 300px" required="true"/>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;width: 200px">被干扰信道号/频率：</td>
					<td style="width: 350px">
	                     <input type="text" id="infchannel" name="infchannel" class="easyui-validatebox" values="" style="text-align:center;width:300px" required="true"/>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;width: 200px">计算结果：</td>
					<td style="width: 350px">
					    <textarea name="result" cols="38" rows="6"  id="result" wrap="hard"></textarea>
					</td>
				</tr>
				<tr>
					<td style="text-align:center;" colspan="2">
						<a href="javascript:calculate()" class="easyui-linkbutton" >计算</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:refresh2()" class="easyui-linkbutton" >清空</a>
					</td>
				</tr>
			</table>
		</form>
	   </div>
</div>
<!-- 右边的功能框  -->
<div style="float:left;margin-left:5%;margin-top:5px;width:550px;height:850px;padding:5px;">
			<form id="fm" action="" method="post">
				<table cellpadding="8px" url="" fit="true" style="BORDER-COLLAPSE: collapse;" borderColor=#111111 cellSpacing=0 cellPadding=0  width=500    bgColor=#f5efe7 border=0>
					<tr align="center" bgColor=#dbc2b0>
						<th colspan="3" style="padding-bottom: 10px"><big>干扰参数配置</big></th>
					</tr>
					<tr >
						<td>干扰最小时长：</td>
						<td >
						    <input type="text" id="infMinMinutes" name="infMinMinutes"  class="easyui-validatebox" values="" style="text-align:center;width:200px;" required="true"/></td>
						<td>分</td>
					</tr>
					<tr>
						<td>干扰最长时长：</td>
						<td><input type="text" id="infMaxMinutes" name="infMaxMinutes" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>分</td>
					</tr>
					<tr>
						<td>干扰最小通话质量：</td>
						<td>
							<input type="text" id="minrxqual" name="minrxqual" class="easyui-validatebox"  values="" style="text-align:center;width: 200px" required="true"/>
						</td>
					</tr>
					<tr>
						<td>最小测量报告干扰数目：</td>
						<td>
		                     <input type="text" id="numofinfrxqual" name="numofinfrxqual" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/>
						</td>
					</tr>
					<tr>
						<td>闲时开始时间：</td>
						<td><input type="text" id="minleisuretime" name="minleisuretime" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>时</td>
					</tr>
					<tr>
						<td>闲时结束时间：</td>
						<td><input type="text" id="maxleisuretime" name="maxleisuretime" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>时</td>
					</tr>
					<tr>
						<td>TCH信道阈值(非KPS)：</td>
						<td><input type="text" id="NotKPSTCHthreshold" name="NotKPSTCHthreshold" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>dB</td>
					</tr>
					<tr>
						<td>TCH信道阈值(KPS)：</td>
						<td><input type="text" id="KPSTCHthreshold" name="KPSTCHthreshold" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>dB</td>
					</tr>
					<tr>
						<td>单点干扰阈值：</td>
						<td><input type="text" id="Onepointthreshold" name="Onepointthreshold" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>dB</td>
					</tr>
					<tr>
						<td>其他信道阈值：</td>
						<td><input type="text" id="Otherchannelthreshold" name="Otherchannelthreshold" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>dB</td>
					</tr>
					<tr>
						<td>业务等级1延时时间：</td>
						<td><input type="text" id="Servicelevel1" name="Servicelevel1" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>分</td>
					</tr>
					<tr>
						<td>业务等级2延时时间：</td>
						<td><input type="text" id="Servicelevel2" name="Servicelevel2" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>分</td>
					</tr>
					<tr>
						<td>业务等级3延时时间：</td>
						<td><input type="text" id="Servicelevel3" name="Servicelevel3" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>分</td>
					</tr>
					<tr>
						<td>干扰电平阈值：</td>
						<td><input type="text" id="Minimumlevel" name="Minimumlevel" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td>dBm</td>
					</tr>
					<tr>
						<td>BCCH同邻频干扰名称：</td>
						<td><input type="text" id="BCCH" name="BCCH" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td> </td>
					</tr>
					<tr>
						<td>TCH同邻频干扰名称：</td>
						<td><input type="text" id="TCH" name="TCH" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td> </td>
					</tr>
			
					<tr>
						<td>测量报告干扰名称：</td>
						<td><input type="text" id="BLOCK" name="BLOCK" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td> </td>
					</tr>
					<tr>
						<td>互调干扰名称：</td>
						<td><input type="text" id="INTERMODULATION" name="INTERMODULATION" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td> </td>
					</tr>
					<tr>
						<td>杂散干扰名称：</td>
						<td><input type="text" id="SPURIOUS" name="SPURIOUS" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td> </td>
					</tr>
					<tr>
						<td>其他类型干扰名称：</td>
						<td><input type="text" id="OTHER" name="OTHER" class="easyui-validatebox" values="" style="text-align:center;width: 200px" required="true"/></td>
						<td> </td>
					</tr>
					
					<c:if test="${currentMemberShip.group.name=='管理员' }">
					<tr>
						
						<td style="text-align:center;" colspan="2">
							<a href="javascript:submitData1()" class="easyui-linkbutton" >应用</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="javascript:refresh1()" class="easyui-linkbutton" >刷新</a>
						</td>
					</tr>
					</c:if>
				</table>
			</form>
</div>
</body>
</html>